package main
import (
    "labix.org/v2/mgo"
    "labix.org/v2/mgo/bson"
    "time"
)

var (
    mongo ,_ = mgo.Dial("localhost")
    DB = mongo.DB("ATT")
    DB_AnalyzeData = DB.C("AnalyzeResult")
    DB_AnalyzeTask   = DB.C("AnalyzeTask")
)

type AnalyzeData struct {
    ID bson.ObjectId "_id"
    App_name string
    Start_time,Finish_time time.Time
    Data_3G,Data_wifi []TrafficLog
}

type Task struct {
    ID bson.ObjectId "_id"
    Apk_name string
    Status  string
}

func NewID()  bson.ObjectId {
    return bson.NewObjectId()
}
